<!--
 * @Author: 头像组件
 * @Date: 2021-07-18 15:13:13
 * @LastEditTime: 2021-07-20 14:33:13
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \VUE\搭建工程\my-site\src\components\Avatar.vue
-->
<template>
  <div class="avatar-container">
    <img alt="照片太丑，加载不出来" src="../../assets/1.jpg" :style="{width:size+'px',height:size+'px'}">
  </div>
</template>

<script>
  export default {
    props:{
       url:{
       type :String
       },
       size:{
         
       },

    }
  }
</script>

<style lang='less' scoped>
@import url("~@/style/mixin.less");
.avatar-container {
  margin: 0 auto;
  img{
    border-radius: 50%;
    object-fit: cover;
    display: block;
  }
}
</style>